<% (display-partial "doctype") %>
<head>
	<% (display-partial "header") %>
</head>

<body>

<div id="wrap">
	<div id="header">
		<% (display-partial "navigation") %>	
		<div class="clear"></div>
	</div>

	<div id="content">
				
		<div class="title nomargin">
			<p><% (title "| Dragonfly web framework") %><p>
		</div>
		
		<h1>Dragonfly in Non-Root</h1>
		<p>Say you want to test Dragonfly out by placing the entire
		directory into the root of your site. As an example the demo site
		could be located here:</p>

		<p><span class="code">/home/user/mysite.com/dragonfly/example-site/</span></p>

		<p>And to access it you would use this URL:</p>

		<p><span class="code">http://www.mysite.com/dragonfly/example-site</span></p>

		<h3 class="code">Step 1: Update the .htaccess file</h3>
		<p>The <b>.htaccess</b> file is a hidden file located inside the example-site folder.<br/>Change this line in <b>.htaccess</b>:</p>

			<pre class="code">RewriteBase /</pre>
			<p>To:</p>
			<pre class="code">RewriteBase /dragonfly/example-site/</pre>


		<h3 class="code">Step 2: Update Dragonfly's configuration</h3>

		<p>In <span class="code">example-site/dragonfly-framework</span> you'll find the file <b>config.lsp</b>.<br/>Change this line:</p>

			<pre class="textmate-source"><span class="source source_newlisp"><span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">constant</span> <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">global</span> '<span class="entity entity_symbol entity_symbol_lisp">DOCUMENT_ROOT</span><span class="entity entity_paren entity_paren_lisp">)</span> <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">env</span> <span class="string string_quoted string_quoted_double string_quoted_double_lisp"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_lisp">"</span>DOCUMENT_ROOT<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_lisp">"</span></span><span class="entity entity_paren entity_paren_lisp">))</span></span></pre>
			<p>To:</p>
			<pre class="textmate-source"><span class="source source_newlisp"><span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">constant</span> <span class="entity entity_paren entity_paren_lisp">(</span><span class="entity entity_name entity_name_function entity_name_function_lisp">global</span> '<span class="entity entity_symbol entity_symbol_lisp">DOCUMENT_ROOT</span><span class="entity entity_paren entity_paren_lisp">)</span>
          <span class="string string_quoted string_quoted_double string_quoted_double_lisp"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_lisp">"</span>/home/user/mysite.com/dragonfly/example-site<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_lisp">"</span></span><span class="entity entity_paren entity_paren_lisp">)</span></span></pre>

		<h3 class="code">Step 3 (optional): newLISP outside from /usr/bin/</h3>
		<p>
		A possible third step is required if your newlisp binary is NOT
		installed in <b>/usr/bin/newlisp</b>.<br/><br/>If it's installed somewhere else
		(for example: /path/to/bin/newlisp), then you may need to also
		edit <b>index.cgi</b> file and change the top line from:</p>

		<pre class="textmate-source"><span class="source source_newlisp"><span class="comment comment_line comment_line_semicolon comment_line_semicolon_lisp"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_lisp">#</span>!/usr/bin/env newlisp</span></span></pre>
		<p>To:</p>
		<pre class="textmate-source"><span class="source source_newlisp"><span class="comment comment_line comment_line_semicolon comment_line_semicolon_lisp"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_lisp">#</span>!/path/to/bin/newlisp</span></span></pre>

		<div class="line-dotted"></div>

		<% (benchmark-result) %>
		
		<div class="line-dotted"></div>
		
		
	</div><!-- END CONTENT -->
	
</div><!-- END WRAP -->
<% (display-partial "footer") %>

